from fastapi import APIRouter

from app.models import responses
from app.services import accounts

router = APIRouter(
    prefix='/api/v1/test',
    tags=['backend', 'test']
)


@router.get('/auth')
async def test_auth(account: accounts.LoggedInAccount):
    return responses.SuccessResponse(
        msg='认证成功',
        data=account.model_dump(include={'aid', 'username', 'avatar', 'email', 'max_apps', 'identity'})
    )
